import 'package:flutter/material.dart';

import '../../../../model/book.dart';
import '../../../../widgets/common_image.dart';

class CommonListWidgets extends StatelessWidget {
  final BookModel data;

  const CommonListWidgets(this.data, {Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    var width = MediaQuery.of(context).size.width * 0.33 - 15;
    return GestureDetector(
      onTap: (){
      },
      child: Container(
        width: width,
        padding: EdgeInsets.only(top: 30.0),
        child: Column(
          children: [
            Container(
                width: 100.0,
                height: 100.0,
                child: CommonImage(data.bookImgUrl!)),
            SizedBox(height: 5.0,),
            Text(data.title!, style: TextStyle(fontSize: 16.0),),
            Text(data.subTitle!, style: TextStyle(fontSize: 14.0, color: Colors.grey),)
          ],
        ),
      ),
    );
  }
}